﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BusinessObjects.BO_GetObjects;

public partial class Controls_Video : Base_Controls
{
    protected void Page_Load(object sender, EventArgs e)
    {
        base.setField(Convert.ToInt32(this.Attributes["ID"]));
        ObjDT = BO_portal_videos.SelectModule(Mid, PSize);
        if (ObjDT.Rows.Count > 0)
        {
            ltrVideo.InnerHtml = "<object width=\"278\" height=\"161\" name=\"player\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" id=\"player\"><param value=\"/images/player.swf\" name=\"movie\"><param value=\"true\" name=\"allowfullscreen\"><param value=\"always\" name=\"allowscriptaccess\"><param value=\"transparent\" name=\"wmode\"><param value=\"file=/upload/" + ObjDT.Rows[0]["PATH"].ToString() + "&amp;image=/upload/" + ObjDT.Rows[0]["IMAGES"].ToString() + "&amp;skin=/images/modieus.swf\"name=\"flashvars\"><object width=\"279\" height=\"169\" data=\"/images/player.swf\" type=\"application/x-shockwave-flash\"><param value=\"/swf/player-viral.swf\" name=\"movie\"><param value=\"true\" name=\"allowfullscreen\"><param value=\"always\" name=\"allowscriptaccess\"><param value=\"transparent\" name=\"wmode\"><param value=\"file=/upload/" + ObjDT.Rows[0]["PATH"].ToString() + "&amp;image=/upload/" + ObjDT.Rows[0]["IMAGES"].ToString() + "&amp;skin=/images/modieus.swf\"name=\"flashvars\"><p><a href=\"http://get.adobe.com/flashplayer\">Get Flash</a> to see this player.</p></object></object>";
        }
        base.bindRepeater(rptData, ObjDT);
    }
    //protected void rptData_ItemCommand(object source, RepeaterCommandEventArgs e)
    //{
    //    ObjDT = BO_portal_videos.Search(Convert.ToInt32(e.CommandArgument));
    //    ltrVideo.Text = "<object width=\"279\" height=\"169\" name=\"player\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" id=\"player\"><param value=\"/images/player.swf\" name=\"movie\"><param value=\"true\" name=\"allowfullscreen\"><param value=\"always\" name=\"allowscriptaccess\"><param value=\"transparent\" name=\"wmode\"><param value=\"file=/upload/" + ObjDT.Rows[0]["PATH"].ToString() + "&amp;image=/upload/" + ObjDT.Rows[0]["IMAGES"].ToString() + "&amp;skin=/images/modieus.swf\"name=\"flashvars\"><object width=\"279\" height=\"169\" data=\"/images/player.swf\" type=\"application/x-shockwave-flash\"><param value=\"/swf/player-viral.swf\" name=\"movie\"><param value=\"true\" name=\"allowfullscreen\"><param value=\"always\" name=\"allowscriptaccess\"><param value=\"transparent\" name=\"wmode\"><param value=\"file=/upload/" + ObjDT.Rows[0]["PATH"].ToString() + "&amp;image=/upload/" + ObjDT.Rows[0]["IMAGES"].ToString() + "&amp;skin=/images/modieus.swf\"name=\"flashvars\"><p><a href=\"http://get.adobe.com/flashplayer\">Get Flash</a> to see this player.</p></object></object>";
    //}
}